#ifndef _MAIN_H
#define _MAIN_H

#include <windows.h>

typedef struct _PARAMETER {
    char Com[16];
	unsigned int Bote;
	unsigned char Databit;
	unsigned char Checkbit;
	unsigned char Stopbit;
	unsigned char Display;
	unsigned char RtsCts;
} PARAMETER,*LPARAMETER;


BOOL WINAPI Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL WINAPI Gnss_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL Main_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
void Main_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
void Main_OnKeyDown(HWND hwnd, UINT wParam, BOOL s, UINT lParam, UINT hParam);
void Main_OnClose(HWND hwnd);
void DlagInit(HWND hwnd);
void GetComConifg(HWND hwnd);
DWORD WINAPI RevThreadFunc(LPVOID lpParam);
DWORD WINAPI SedThreadFunc(LPVOID lpParam);
void ReceiveChar(void);
void ReadCom(HWND hwnd);
void WriteCom(HWND hwnd);

void EnableSomething(HWND hwnd,BOOL sta);
int get_input_edit(HWND hwnd,int nIDDlgItem,char *buff,int count);
int set_input_edit(HWND hwnd,int nIDDlgItem,char *buff);
int uart_send_char(char d);
int uart_send(char *str);
int uart_read(char *buff,int count);

#endif